<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <head th:include="commom::title('门诊管理系统')"></head>
</head>

<body>
<div class="layuimini-container">
    <div class="layuimini-main">




        <!-- 表 格 信 息 -->
        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>


    </div>
</div>
<script th:src="@{/static/lib/layui-v2.5.5/layui.js}" charset="utf-8"></script>
<script>
    layui.use(['form', 'table','layer','laypage'], function () {
        const $ = layui.jquery,
            form = layui.form,
            layer = layui.layer,
            table = layui.table;

        table.render({
            elem: '#currentTableId',
            url: '/root/examination',
            limits: [3, 5, 10, 20],
            limit: 10,
            page: true,
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print'],
            cols: [
                [
                    {type: "checkbox", field: 'center'},
                    {field: 'patient_id', width: 100, title: '病人ID', align:'center'},
                    {field: 'patient_name', width: 120, title: '病人名字', align:'center'},
                    {field: 'check_id', width: 100, title: '检查ID', sort: true, align:'center'},
                    {field: 'check_name', width: 250, title: '检查项目名称', align:'center'},
                    {field: 'check_price', width: 120, title: '检查价格', sort: true, align:'center'},
                    {field: 'exam_state', width: 120, title: '状态', sort: true, align:'center'},
                ]
            ],
            id: 'testReload'
        });
        $('#ss').on('click', function () {
            // 搜索条件
            const prescription = $('#prescription').val();
            table.reload('testReload', {
                method: 'post'
                , where: {
                    'prescription': prescription
                }
                , page: {
                    curr: 1
                }
            });
        });




    });
</script>

</body>
</html>